Optimal. Leaf size=42 \[ -\frac {a^2 \cot (c+d x)}{d}+\frac {2 a b \log (\tan (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3516, 43} \[ -\frac {a^2 \cot (c+d x)}{d}+\frac {2 a b \log (\tan (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3516
Rubi steps
\begin {align*} \int \csc ^2(c+d x) (a+b \tan (c+d x))^2 \, dx &=\frac {b \operatorname {Subst}\left (\int \frac {(a+x)^2}{x^2} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac {b \operatorname {Subst}\left (\int \left (1+\frac {a^2}{x^2}+\frac {2 a}{x}\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac {a^2 \cot (c+d x)}{d}+\frac {2 a b \log (\tan (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.58, size = 91, normalized size = 2.17 \[ -\frac {\cos (c+d x) (a+b \tan (c+d x))^2 \left (a \cos (c+d x) (a \cot (c+d x)+2 b (\log (\cos (c+d x))-\log (\sin (c+d x))))-b^2 \sin (c+d x)\right )}{d (a \cos (c+d x)+b \sin (c+d x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.46, size = 96, normalized size = 2.29 \[ -\frac {a b \cos \left (d x + c\right ) \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - a b \cos \left (d x + c\right ) \log \left (-\frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4}\right ) \sin \left (d x + c\right ) + {\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} - b^{2}}{d \cos \left (d x + c\right ) \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.87, size = 51, normalized size = 1.21 \[ \frac {2 \, a b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) + b^{2} \tan \left (d x + c\right ) - \frac {2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.47, size = 43, normalized size = 1.02 \[ -\frac {a^{2} \cot \left (d x +c \right )}{d}+\frac {2 a b \ln \left (\tan \left (d x +c \right )\right )}{d}+\frac {b^{2} \tan \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.47, size = 39, normalized size = 0.93 \[ \frac {2 \, a b \log \left (\tan \left (d x + c\right )\right ) + b^{2} \tan \left (d x + c\right ) - \frac {a^{2}}{\tan \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.64, size = 44, normalized size = 1.05 \[ \frac {b^2\,\mathrm {tan}\left (c+d\,x\right )}{d}-\frac {a^2}{d\,\mathrm {tan}\left (c+d\,x\right )}+\frac {2\,a\,b\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \csc ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________